package it.giuseppefrattura.wwdefence;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.modifier.MoveXModifier;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.scene.background.Background;
import org.andengine.entity.text.Text;

public class WinScene extends Scene{

	MainActivity activity;
	Camera mCamera;
	
	public WinScene() {
		activity = MainActivity.getSharedInstance();
		activity.setCurrentScene(this);
	    setBackground(new Background(0.09804f, 0.6274f, 0.8784f));
	    mCamera = activity.mCamera;
	    
	    Text title1 = new Text(0, 0, activity.mFont, activity.getString(R.string.win), activity.getVertexBufferObjectManager());
		
		title1.setPosition(-title1.getWidth(), activity.mCamera.getHeight() / 2);
		
		attachChild(title1);
		
		title1.registerEntityModifier(new MoveXModifier(1, title1.getX(), activity.mCamera.getWidth() / 2 - title1.getWidth()));
		
	    
	}
	
}
